package com.xmb.wechat.bean;

import android.support.annotation.Nullable;

import java.io.Serializable;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;
import io.objectbox.relation.ToMany;

/**
 * @Author lijiangop
 * @CreateTime 2020/4/30 14:10
 */
@Entity
public class GroupTalkBean implements Serializable {
    @Id
    long id;
    String  groupName;
    String  groupBg;
    int     groupMembers;
    boolean isNoDisturbing;
    boolean isShowNickName;

    private ToMany<WechatContactBean> groupMembersList;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupBg() {
        return groupBg;
    }

    public void setGroupBg(String groupBg) {
        this.groupBg = groupBg;
    }

    public int getGroupMembers() {
        return groupMembers;
    }

    public void setGroupMembers(int groupMembers) {
        this.groupMembers = groupMembers;
    }

    public boolean isNoDisturbing() {
        return isNoDisturbing;
    }

    public void setNoDisturbing(boolean noDisturbing) {
        isNoDisturbing = noDisturbing;
    }

    public boolean isShowNickName() {
        return isShowNickName;
    }

    public void setShowNickName(boolean showNickName) {
        isShowNickName = showNickName;
    }

    public ToMany<WechatContactBean> getGroupMembersList() {
        return groupMembersList;
    }

    public void setGroupMembersList(ToMany<WechatContactBean> groupMembersList) {
        this.groupMembersList = groupMembersList;
    }

    @Override
    public boolean equals(@Nullable Object obj) {
        if (obj instanceof GroupTalkBean) {
            GroupTalkBean u = (GroupTalkBean) obj;
            return this.id == u.id;
        }
        return super.equals(obj);
    }

    @Override
    public String toString() {
        return "GroupTalkBean{" +
                "id=" + id +
                ", groupName='" + groupName + '\'' +
                ", groupBg='" + groupBg + '\'' +
                ", groupMembers=" + groupMembers +
                ", isNoDisturbing=" + isNoDisturbing +
                ", isShowNickName=" + isShowNickName +
                ", groupMembersList=" + groupMembersList +
                '}';
    }
}
